using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class BuffTip : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
    Transform tip;
    MeshRenderer meshRenderer;

    private void Start()
    {
        tip = transform.Find("Tip");
        meshRenderer = tip.GetComponentInChildren<MeshRenderer>();
        meshRenderer.sortingOrder = 12;
        tip.gameObject.SetActive(false);
    }

    public void OnPointerEnter(PointerEventData eventData)
    {
        tip.gameObject.SetActive(true);
    }

    public void OnPointerExit(PointerEventData eventData)
    {
        tip.gameObject.SetActive(false);
    }
}
